public abstract class SystemItem {

	private String name;
	private Directory parent;

	// Initialize SystemItem objects with a name and parent directory.
	// Note potential ERROR! if a systemItem ref. var. points to a 
	// directory, you can't use that reference to make that object
	// some other SystemItem's parent, since its written as Directory
	// below. NOT a big issue, just something to watch out for.
	public SystemItem(String n, Directory dir) {
		name = n;
		parent = dir;
	}

	// Get and Set methods for name & parent.
	public String getName() {
		return name;
	}

	public void setName(String n) {
		name = n;
	}

	public Directory getParent() {
		return parent;
	}

	public void setParent(Directory dir) {
		parent = dir;
	}

	// Return the full path of any SystemItem object with non-null parent.
	public String getFullPath() {
		if (parent != null)
			return parent.getFullPath() + "/" + name;
		else
			return "";
	}

	abstract public void printContents();
	abstract public Object getContents();
}
